import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { FormBuilder } from '@angular/forms';

import { BasePanel } from '../base-panel/base-panel';

@Component({
  selector: 'app-radio-panel',
  templateUrl: './radio-panel.component.html',
  styleUrls: ['../base-panel/base-panel.scss', './radio-panel.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class RadioPanelComponent extends BasePanel implements OnInit {
  propertys: string[] = ['name', 'label', 'placeholder', 'options'];

  constructor(
    public formBuilder: FormBuilder,
  ) {
    super(formBuilder);
  }

  ngOnInit() {
    this.patchValue(this.propertys);
    this.formGroupChangeValue();
  }

}
